package com.qidian.mes.cal.service.Impl;

import com.qidian.mes.cal.mapper.CalTeamShiftMapper;
import com.qidian.mes.cal.service.CalTeamShiftService;
import com.qidian.mes.cal.vo.TeamAndShiftVO;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CalTeamShiftServiceImpl implements CalTeamShiftService {
    @Autowired
    CalTeamShiftMapper calTeamShiftMapper;

    @Override
    //分类排版日历
    public MESResult select() {
        return MESResult.ok(calTeamShiftMapper.select());
    }

    @Override
    //删除排班
    public MESResult delete(Long recordId) {
        return MESResult.ok(calTeamShiftMapper.delete(recordId));
    }

    @Override
    //查询班组信息
    public MESResult list(Long planId) {
        return MESResult.ok(calTeamShiftMapper.list(planId));
    }

    @Override
    //添加班组排班
    public MESResult save(TeamAndShiftVO vo) {
        return MESResult.ok(calTeamShiftMapper.save(vo));
    }
}
